import fetch from "@/utils/fetch"

//发布文章
export function addArticle(data) {
    return fetch({
        url: '/API/articleManagement/addArticle',
        method: 'post',
        data: data
    });
}

//上传图片到阿里云，
export function addimgfile(data) {
    return fetch({
        url: '/API/user/addimgfile',
        method: 'post',
        data: data
    });
}
//获取全部文章
export function getAllArticle(data){
    return fetch({
        url: '/API/articleManagement/getAllArticle',
        method: 'get',
        params:data
    })
}
//获取文章详情
export function getArticleDetails(obj){
    return fetch({
        url: '/API/articleManagement/getArticleDetails',
        method: 'get',
        params: obj
    })
}
//用户评论文章
export function userComment(obj){
    return fetch({
        url: '/API/articleManagement/userComment',
        method: 'post',
        data: obj
    })
}
//获取分类菜单
export function getClassMenu(){
    return fetch({
        url: '/API/articleManagement/getClassMenu',
        method: "get"
    })
}



